#include<iostream>
#include<memory>
#include"ThreadPool.hpp" 
#include"mythread.hpp"
#include"Task.hpp"
int main()
{
    std::unique_ptr<ThreadPool<Task>> tp = std::make_unique<ThreadPool<Task>>();//c++14特性构造一个unique_ptr对象
    tp->Init();
    tp->start();
    //运行十次任务，test
    int cnt = 10;
    while(cnt--)
    {
        Task t(1,2);
        tp->Push(t);
    }
    tp->Stop();
    sleep(10);
    std::cout<<"Main thread quit..."<<std::endl;
    return 0;
}